package com.groovy.learning;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DealWithprocess {

	//que fait ce code
	public static void main (String [] args){
		
		try {
			Process p = Runtime.getRuntime().exec("cmd /c dir");
			
			BufferedReader out = new BufferedReader(new InputStreamReader(p.getInputStream()));
			String line;
			while ((line = out.readLine())!=null){
				System.out.println(line);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
